$(function(){
   //canh giua login
//   var wWidth = $(window).width();
   $("#sLeft").css("padding-left","30%");
   
  //kiem tra form
  $('form').validationEngine();
  //end kiem tra form
  
  $('.date-picker').datepicker( {
	  monthNamesShort: ["01","02","03","04","05","06","07","08","09","10","11","12"],
      changeMonth: true,
      changeYear: true,
      showButtonPanel: true,
      dateFormat: 'mm/yy',
      yearRange: "-1:+0",
      onClose: function(dateText, inst) { 
          var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
          var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
          $(this).datepicker('setDate', new Date(year, month, 1));
      },
      beforeShow : function(input, inst) {
          if ((datestr = $(this).val()).length > 0) {
              var year = datestr.substring(datestr.length-4, datestr.length);
              var month = datestr.substring(0, datestr.length-5) - 1;
              $(this).datepicker('option', 'defaultDate', new Date(year, month));
              $(this).datepicker('setDate', new Date(year, month, 1));
          }
      }
  });
  
	//tablejs
	$('.tableJs').dataTable( {
		"sDom": 'R<"H"lfr>t<"F"ip>',
		"bJQueryUI": true,
		"bRetrieve ":true,
		"sPaginationType": "full_numbers"
	});
	//end tablejs
	  
	//ke soc tr even trong table
	$('tr:even').addClass('trEven');
	
	//header menu
	$(".headerMenu li").hover(function(){
		var ulMenu2 = $(this).find(".menu2");
		ulMenu2.show();
	},function(){
		ulMenu2.hide();
	});
	  
});//ket thuc funtion jquery